<template>
	<el-tabs v-model="activeName">
		<el-tab-pane label="基本信息" name="baseInfo">
			<basic-info :id="id" />
		</el-tab-pane>
		<el-tab-pane label="团队列表" name="partners">
			<team-list :id="id"/>
		</el-tab-pane>
		<el-tab-pane label="产品管理" name="product">
			<prod-mgt :id="id"/>
		</el-tab-pane>
		<el-tab-pane label="佣金记录" name="commission">
			<bk-record :id="id"/>
		</el-tab-pane>
		<el-tab-pane label="提现记录" name="withdraw">
			<wd-record :id="id"/>
		</el-tab-pane>
	</el-tabs>
</template>

<script>
import BasicInfo from "./basicInfo";
import TeamList from "./teamList";
import ProductsMgt from "./productsMgt";
import brokerageRecord from "./brokerageRecord";
import withdrawRecord from "./withdrawRecord";
export default {
	name: "index",
	components: {
		"team-list": TeamList,
		"basic-info": BasicInfo,
		"prod-mgt": ProductsMgt,
		"bk-record": brokerageRecord,
		"wd-record": withdrawRecord
	},
	data() {
		const {id} = this.$route.params;
		return {
			id,
			activeName: 'baseInfo'
		};
	},
	methods: {
	},
	created(){
		if (this.$route.name == 'dealerDetail') {
      const {id} = this.$route.params;
     	if(!id) {
        ths.cancel()
      }
    }
	}
};
</script>

<style scoped lang="scss">
.dealer-info {
	.info-con {
		overflow: hidden;
		.info-item {
			position: relative;
			left: 0;
			animation: moving 1s;
			padding: 20px 0px;
		}
		@keyframes moving {
			from {
				left: -100%;
			}
			to {
				left: 0;
			}
		}
	}
}
</style>
